package com.scuec.groupfive.service.impl;

import com.scuec.groupfive.entity.QuestionInfo;
import com.scuec.groupfive.entity.Questions;
import com.scuec.groupfive.mapper.QuestionMapper;
import com.scuec.groupfive.service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class QuestionServiceImpl implements QuestionService {
    @Resource
    private QuestionMapper questionMapper;

    @Override
    public int updateQuestionInfo(QuestionInfo questionInfo) {
        return questionMapper.updateQuestionInfo(questionInfo);
    }

    @Override
    public Questions getQuestionById(Long id) {
        return questionMapper.selectQuestionById(id);
    }

    @Override
    public List<Questions> getAllQuestions() {
        return questionMapper.selectAllQuestions();
    }
}